package com.design;

/**
 * 抽象用户
 */
public abstract class User {
    protected  GroupChat groupChat;
    protected String name;
    public User(GroupChat groupChat,String name) {
        this.name = name;
        this.groupChat=groupChat;
    }
     /**
      * 发送消息
      */
    protected  abstract void sendMessage(String message);
     /**
      * 接收消息
      */
    protected  abstract void receiveMessage(String from,String message);

    public String getName() {
        return name;
    }
}
